package com.lizhenhua.stockquery.controller;

import com.lizhenhua.fmmall.entity.ShoppingCartVo;
import com.lizhenhua.stockquery.service.impl.QueryStock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class QueryStockController {
    @Autowired
    private QueryStock queryStockService;

    @GetMapping("/stock/query")
    public List<ShoppingCartVo> queryStock(@RequestParam("cids") String cids) {

        System.out.println("---------------调用额stock");
        return queryStockService.selectShopcartsByCids(cids);
    }

}
